import { createRouter, createWebHistory } from 'vue-router';
import DefaultLayout from '../../layouts/DefaultLayout.vue';
import Yiaibookstore from '@/components/Yiaibookstore.vue';
import MainIndex from '@/components/MainIndex.vue';
import TrainClass from '@/components/TrainClass.vue';


const routes = [
  {
    path: '/',
    component: DefaultLayout,
    children: [
      {
        path: '/train/class/:id',
        component: TrainClass,
      },
      {
        path: 'yiaibookstore',
        component: Yiaibookstore,
      },
      // 可以添加其他子路由
    ],
  },
];

const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;